.class public Les/cq0;
.super Ljava/lang/Object;
.source "HMac.java"

# interfaces
.implements Lorg/bouncycastle/crypto/e;


# static fields
.field private static f:Ljava/util/Hashtable;


# instance fields
.field private a:Lorg/bouncycastle/crypto/c;

.field private b:I

.field private c:I

.field private d:[B

.field private e:[B


# direct methods
.method static constructor <clinit>()V
    .locals 5

    .line 1
    new-instance v0, Ljava/util/Hashtable;

    invoke-direct {v0}, Ljava/util/Hashtable;-><init>()V

    sput-object v0, Les/cq0;->f:Ljava/util/Hashtable;

    .line 2
    new-instance v1, Ljava/lang/Integer;

    const/16 v2, 0x20

    invoke-direct {v1, v2}, Ljava/lang/Integer;-><init>(I)V

    const-string v2, "GOST3411"

    invoke-virtual {v0, v2, v1}, Ljava/util/Hashtable;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 3
    sget-object v0, Les/cq0;->f:Ljava/util/Hashtable;

    new-instance v1, Ljava/lang/Integer;

    const/16 v2, 0x10

    invoke-direct {v1, v2}, Ljava/lang/Integer;-><init>(I)V

    const-string v2, "MD2"

    invoke-virtual {v0, v2, v1}, Ljava/util/Hashtable;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 4
    sget-object v0, Les/cq0;->f:Ljava/util/Hashtable;

    new-instance v1, Ljava/lang/Integer;

    const/16 v2, 0x40

    invoke-direct {v1, v2}, Ljava/lang/Integer;-><init>(I)V

    const-string v3, "MD4"

    invoke-virtual {v0, v3, v1}, Ljava/util/Hashtable;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 5
    sget-object v0, Les/cq0;->f:Ljava/util/Hashtable;

    new-instance v1, Ljava/lang/Integer;

    invoke-direct {v1, v2}, Ljava/lang/Integer;-><init>(I)V

    const-string v3, "MD5"

    invoke-virtual {v0, v3, v1}, Ljava/util/Hashtable;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 6
    sget-object v0, Les/cq0;->f:Ljava/util/Hashtable;

    new-instance v1, Ljava/lang/Integer;

    invoke-direct {v1, v2}, Ljava/lang/Integer;-><init>(I)V

    const-string v3, "RIPEMD128"

    invoke-virtual {v0, v3, v1}, Ljava/util/Hashtable;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 7
    sget-object v0, Les/cq0;->f:Ljava/util/Hashtable;

    new-instance v1, Ljava/lang/Integer;

    invoke-direct {v1, v2}, Ljava/lang/Integer;-><init>(I)V

    const-string v3, "RIPEMD160"

    invoke-virtual {v0, v3, v1}, Ljava/util/Hashtable;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 8
    sget-object v0, Les/cq0;->f:Ljava/util/Hashtable;

    new-instance v1, Ljava/lang/Integer;

    invoke-direct {v1, v2}, Ljava/lang/Integer;-><init>(I)V

    const-string v3, "SHA-1"

    invoke-virtual {v0, v3, v1}, Ljava/util/Hashtable;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 9
    sget-object v0, Les/cq0;->f:Ljava/util/Hashtable;

    new-instance v1, Ljava/lang/Integer;

    invoke-direct {v1, v2}, Ljava/lang/Integer;-><init>(I)V

    const-string v3, "SHA-224"

    invoke-virtual {v0, v3, v1}, Ljava/util/Hashtable;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 10
    sget-object v0, Les/cq0;->f:Ljava/util/Hashtable;

    new-instance v1, Ljava/lang/Integer;

    invoke-direct {v1, v2}, Ljava/lang/Integer;-><init>(I)V

    const-string v3, "SHA-256"

    invoke-virtual {v0, v3, v1}, Ljava/util/Hashtable;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 11
    sget-object v0, Les/cq0;->f:Ljava/util/Hashtable;

    new-instance v1, Ljava/lang/Integer;

    const/16 v3, 0x80

    invoke-direct {v1, v3}, Ljava/lang/Integer;-><init>(I)V

    const-string v4, "SHA-384"

    invoke-virtual {v0, v4, v1}, Ljava/util/Hashtable;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 12
    sget-object v0, Les/cq0;->f:Ljava/util/Hashtable;

    new-instance v1, Ljava/lang/Integer;

    invoke-direct {v1, v3}, Ljava/lang/Integer;-><init>(I)V

    const-string v3, "SHA-512"

    invoke-virtual {v0, v3, v1}, Ljava/util/Hashtable;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 13
    sget-object v0, Les/cq0;->f:Ljava/util/Hashtable;

    new-instance v1, Ljava/lang/Integer;

    invoke-direct {v1, v2}, Ljava/lang/Integer;-><init>(I)V

    const-string v3, "Tiger"

    invoke-virtual {v0, v3, v1}, Ljava/util/Hashtable;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 14
    sget-object v0, Les/cq0;->f:Ljava/util/Hashtable;

    new-instance v1, Ljava/lang/Integer;

    invoke-direct {v1, v2}, Ljava/lang/Integer;-><init>(I)V

    const-string v2, "Whirlpool"

    invoke-virtual {v0, v2, v1}, Ljava/util/Hashtable;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    return-void
.end method

.method public constructor <init>(Lorg/bouncycastle/crypto/c;)V
    .locals 1

    .line 1
    invoke-static {p1}, Les/cq0;->a(Lorg/bouncycastle/crypto/c;)I

    move-result v0

    invoke-direct {p0, p1, v0}, Les/cq0;-><init>(Lorg/bouncycastle/crypto/c;I)V

    return-void
.end method

.method private constructor <init>(Lorg/bouncycastle/crypto/c;I)V
    .locals 0

    .line 2
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 3
    iput-object p1, p0, Les/cq0;->a:Lorg/bouncycastle/crypto/c;

    .line 4
    invoke-interface {p1}, Lorg/bouncycastle/crypto/c;->b()I

    move-result p1

    iput p1, p0, Les/cq0;->b:I

    .line 5
    iput p2, p0, Les/cq0;->c:I

    .line 6
    new-array p1, p2, [B

    iput-object p1, p0, Les/cq0;->d:[B

    .line 7
    new-array p1, p2, [B

    iput-object p1, p0, Les/cq0;->e:[B

    return-void
.end method

.method private static a(Lorg/bouncycastle/crypto/c;)I
    .locals 3

    .line 1
    instance-of v0, p0, Lorg/bouncycastle/crypto/d;

    if-eqz v0, :cond_0

    .line 2
    check-cast p0, Lorg/bouncycastle/crypto/d;

    invoke-interface {p0}, Lorg/bouncycastle/crypto/d;->c()I

    move-result p0

    return p0

    .line 3
    :cond_0
    sget-object v0, Les/cq0;->f:Ljava/util/Hashtable;

    invoke-interface {p0}, Lorg/bouncycastle/crypto/c;->a()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/util/Hashtable;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Integer;

    if-eqz v0, :cond_1

    .line 4
    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result p0

    return p0

    .line 5
    :cond_1
    new-instance v0, Ljava/lang/IllegalArgumentException;

    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "unknown digest passed: "

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-interface {p0}, Lorg/bouncycastle/crypto/c;->a()Ljava/lang/String;

    move-result-object p0

    invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p0

    invoke-direct {v0, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw v0
.end method


# virtual methods
.method public a()I
    .locals 1

    .line 23
    iget v0, p0, Les/cq0;->b:I

    return v0
.end method

.method public a([BI)I
    .locals 6

    .line 25
    iget v0, p0, Les/cq0;->b:I

    new-array v1, v0, [B

    .line 26
    iget-object v2, p0, Les/cq0;->a:Lorg/bouncycastle/crypto/c;

    const/4 v3, 0x0

    invoke-interface {v2, v1, v3}, Lorg/bouncycastle/crypto/c;->a([BI)I

    .line 27
    iget-object v2, p0, Les/cq0;->a:Lorg/bouncycastle/crypto/c;

    iget-object v4, p0, Les/cq0;->e:[B

    array-length v5, v4

    invoke-interface {v2, v4, v3, v5}, Lorg/bouncycastle/crypto/c;->a([BII)V

    .line 28
    iget-object v2, p0, Les/cq0;->a:Lorg/bouncycastle/crypto/c;

    invoke-interface {v2, v1, v3, v0}, Lorg/bouncycastle/crypto/c;->a([BII)V

    .line 29
    iget-object v0, p0, Les/cq0;->a:Lorg/bouncycastle/crypto/c;

    invoke-interface {v0, p1, p2}, Lorg/bouncycastle/crypto/c;->a([BI)I

    move-result p1

    .line 30
    invoke-virtual {p0}, Les/cq0;->b()V

    return p1
.end method

.method public a(Lorg/bouncycastle/crypto/b;)V
    .locals 3

    .line 6
    iget-object v0, p0, Les/cq0;->a:Lorg/bouncycastle/crypto/c;

    invoke-interface {v0}, Lorg/bouncycastle/crypto/c;->reset()V

    .line 7
    check-cast p1, Les/eq0;

    invoke-virtual {p1}, Les/eq0;->a()[B

    move-result-object p1

    .line 8
    array-length v0, p1

    iget v1, p0, Les/cq0;->c:I

    const/4 v2, 0x0

    if-le v0, v1, :cond_1

    .line 9
    iget-object v0, p0, Les/cq0;->a:Lorg/bouncycastle/crypto/c;

    array-length v1, p1

    invoke-interface {v0, p1, v2, v1}, Lorg/bouncycastle/crypto/c;->a([BII)V

    .line 10
    iget-object p1, p0, Les/cq0;->a:Lorg/bouncycastle/crypto/c;

    iget-object v0, p0, Les/cq0;->d:[B

    invoke-interface {p1, v0, v2}, Lorg/bouncycastle/crypto/c;->a([BI)I

    .line 11
    iget p1, p0, Les/cq0;->b:I

    :goto_0
    iget-object v0, p0, Les/cq0;->d:[B

    array-length v1, v0

    if-lt p1, v1, :cond_0

    goto :goto_2

    .line 12
    :cond_0
    aput-byte v2, v0, p1

    add-int/lit8 p1, p1, 0x1

    goto :goto_0

    .line 13
    :cond_1
    iget-object v0, p0, Les/cq0;->d:[B

    array-length v1, p1

    invoke-static {p1, v2, v0, v2, v1}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    .line 14
    array-length p1, p1

    :goto_1
    iget-object v0, p0, Les/cq0;->d:[B

    array-length v1, v0

    if-lt p1, v1, :cond_4

    .line 15
    :goto_2
    iget-object p1, p0, Les/cq0;->d:[B

    array-length v0, p1

    new-array v0, v0, [B

    iput-object v0, p0, Les/cq0;->e:[B

    .line 16
    array-length v1, p1

    invoke-static {p1, v2, v0, v2, v1}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    const/4 p1, 0x0

    .line 17
    :goto_3
    iget-object v0, p0, Les/cq0;->d:[B

    array-length v1, v0

    if-lt p1, v1, :cond_3

    const/4 p1, 0x0

    .line 18
    :goto_4
    iget-object v0, p0, Les/cq0;->e:[B

    array-length v1, v0

    if-lt p1, v1, :cond_2

    .line 19
    iget-object p1, p0, Les/cq0;->a:Lorg/bouncycastle/crypto/c;

    iget-object v0, p0, Les/cq0;->d:[B

    array-length v1, v0

    invoke-interface {p1, v0, v2, v1}, Lorg/bouncycastle/crypto/c;->a([BII)V

    return-void

    .line 20
    :cond_2
    aget-byte v1, v0, p1

    xor-int/lit8 v1, v1, 0x5c

    int-to-byte v1, v1

    aput-byte v1, v0, p1

    add-int/lit8 p1, p1, 0x1

    goto :goto_4

    .line 21
    :cond_3
    aget-byte v1, v0, p1

    xor-int/lit8 v1, v1, 0x36

    int-to-byte v1, v1

    aput-byte v1, v0, p1

    add-int/lit8 p1, p1, 0x1

    goto :goto_3

    .line 22
    :cond_4
    aput-byte v2, v0, p1

    add-int/lit8 p1, p1, 0x1

    goto :goto_1
.end method

.method public a([BII)V
    .locals 1

    .line 24
    iget-object v0, p0, Les/cq0;->a:Lorg/bouncycastle/crypto/c;

    invoke-interface {v0, p1, p2, p3}, Lorg/bouncycastle/crypto/c;->a([BII)V

    return-void
.end method

.method public b()V
    .locals 4

    .line 1
    iget-object v0, p0, Les/cq0;->a:Lorg/bouncycastle/crypto/c;

    invoke-interface {v0}, Lorg/bouncycastle/crypto/c;->reset()V

    .line 2
    iget-object v0, p0, Les/cq0;->a:Lorg/bouncycastle/crypto/c;

    iget-object v1, p0, Les/cq0;->d:[B

    array-length v2, v1

    const/4 v3, 0x0

    invoke-interface {v0, v1, v3, v2}, Lorg/bouncycastle/crypto/c;->a([BII)V

    return-void
.end method
